package com.qf.day06;

public class User {
//    name的长度必须大于3小于10
    private String name;
    public void setName(String name){
        if(name.length()>3 && name.length()<10){
            this.name = name;
        }else {
            System.out.println("name长度必须大于3小于10，请从新输入");
        }
    }
    public String getName(){
        return name;
    }
}
